#!/bin/sh

LOGS="runparts.log queue.log"
MAXSIZE=204800
for i in $LOGS
do
    LOG="/conf/.cron/$i"
    SZ=0
    [ -s $LOG ] && SZ=`stat $LOG | grep Size | awk '{print $2}'`
    if [ $SZ -gt $MAXSIZE ]; then
        rm -f $LOG
        echo "LOGFILE WAS CLEANED AT `date +\"%F %T\"`" > $LOG
    fi
done
